<template>
  <div id="goods-info" v-if="Object.keys(detailInfo).length !== 0">
    <div class="info-desc">
      <div class="start"></div>
      <div class="desc">{{detailInfo.desc}}</div>
      <div class="end"></div>
    </div>
    <div class="info-key">{{detailInfo.detailImage[0].key}}</div>
    <div class="info-list">
      <img v-for="(item, index) in detailInfo.detailImage[0].list" :src="item" :key="index" alt="" @load="imgLoad">
    </div>
  </div>
</template>

<script>
  export default {
    name: "DetailGoodsInfo",
    props:{
      detailInfo:{
        type:Object,
        default (){
          return {}
        }
      }
    },
    methods:{
      imgLoad() {
        this.$emit('imgLoad')
      }
    }
  }
</script>

<style scoped>
  #goods-info{
    padding: 20px 8px;
    border-bottom: 5px solid #f2f5f8;
  }
  .start,.end{
    position: relative;
    width: 100px;
    height: 1px;
    background-color: rgba(0,0,0,.5);
  }
  .start{
    float: left;
  }
  .end{
    float: right;
  }
  .start:before,.end:after{
    content: '';
    width: 5px;
    height: 5px;
    position: absolute;
    bottom: 0;
    background-color: grey;
  }
  .end:after{
    right: 0;
  }
  .desc{
    font-size: 14px;
    padding: 20px 5px;
  }
  .info-key{
    margin: 20px 0 10px;
    font-size: 15px;
    color: #50b7c1;
  }
  .info-list img{
    width: 100%;
  }
  
</style>